package models

import (
	"time"
)

// OrderType 订单类型定义
type OrderType struct {
	Name        string  `yaml:"name" json:"name"`
	Description string  `yaml:"description" json:"description"`
	Price       float64 `yaml:"price" json:"price"`
	Duration    int     `yaml:"duration" json:"duration"` // 订阅时长（天）
}

// OrderTransaction 订单交易记录（临时存储在缓存中）
type OrderTransaction struct {
	OutTradeNo string    `json:"out_trade_no"`
	UserToken  string    `json:"user_token"`
	OrderType  string    `json:"order_type"`
	Amount     float64   `json:"amount"`
	Status     string    `json:"status"` // waiting, success, expired, failed
	CreatedAt  time.Time `json:"created_at"`
	UpdatedAt  time.Time `json:"updated_at"`
	ExpiredAt  time.Time `json:"expired_at"`
}
